package com.dto;



/**
 * 消息的枚举 就是把所有的消息可能都列出来的
 */
//查询全部学生为例  查询成功   查询失败  当前没有数据
public enum MessageEnum {
    GETSTUDENTSUCCESS(200,Messages.GETSTUDENTSUCCESS),
    GETSTUDENTFAIL(4001,Messages.GETSTUDENTFAIL),
    ADDSTIUDENTSUCCESS(200,Messages.ADDSTIUDENTSUCCESS),
    ADDSTIUDENTFAIL(4002,Messages.ADDSTIUDENTFAIL),

    DELETESTUDENTSUCCESS(200,Messages.DELETESTUDENTSUCCESS),
    DELETESTUDENTFAIL(4001,Messages.DELETESTUDENTFAIL),
    UPDATESTIUDENTSUCCESS(200,Messages.UPDATESTIUDENTSUCCESS),
    UPDATESTIUDENTFAIL(4002,Messages.UPDATESTIUDENTFAIL);




    private Integer code;//状态码
    private String message;




    MessageEnum() {
    }

    public Integer getCode() {
        return code;
    }

    MessageEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
